package com.example.demo.controller;

import java.io.IOException;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.example.demo.entity.Person;
import com.example.demo.service.PersonService;
@Controller
@RequestMapping("person")
public class PersonController {
	@Resource
	private PersonService personService;
	@RequestMapping("update")
	public void update(Person person, HttpServletResponse resp) {
		personService.update(person);
//		return "redirect:fkue.com:9999/person/all";
		try {
			resp.sendRedirect("http://fkue.com/root1/person/all");
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	
}
